﻿using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Text;

namespace ManagementApi.Mvc.Authorization
{
    /// <summary>
    /// 权限验证标记
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
    public class PermissionCheckAttribute : AuthorizeAttribute
    {
        /// <summary>
        /// 权限KEY
        /// </summary>
        public string PermissionKey { get; set; }

        public PermissionCheckAttribute(string permissionKey) : base("PermissionCheck")
        {
            PermissionKey = permissionKey;
        }
    }
}
